package org.taobao.lxw.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.taobao.lxw.bean.Comments;

import com.sun.org.glassfish.gmbal.ParameterNames;

public interface ICommentMapper {
	//根据店铺id查询评价总数
	Integer getCommentsCountBySid(Integer sid);
	//根据评价id查找评价
	Comments getCommentById(Integer id);
	//根据评价id和店铺id查找评价
	Comments getCommentByIdAndSid(@Param("id")Integer id,@Param("sid")Integer sid);
	//根据买家名查找评价
	List<Comments> getCommentsByName(@Param("sid")Integer sid,@Param("name")String name);
	//根据订单ID查找评价
	List<Comments> getCommentByOid(Integer oid);
	
	//店铺的所有评价并分页
	List<Comments> getAllCommentPageById(@Param("sid")Integer sid,@Param("pageIndex")Integer pageIndex,@Param("pageSize")Integer pageSize);
}
